properties{
	$config="debug";
}

#task -name ValidateConfig -action{
#	assert("debug","release" -contains $config)
#		"Invalid config:$config; valid values are debug and release";
#}

task -name PackageZip -depends Build -description "produces a zip archive of the build output" -action{
	Import-Module pscx;
	dir ./ConsoleApplication1/bin/debug | write-zip -output ConsoleApplication.zip
}

task -name Build -description "builds outdated artifacts" -action{
	exec{
		msbuild ./ConsoleApplication1/ConsoleApplication1.csproj /t:build /p:Configuration=$config
	}
}

task -name Clean -description "deletes all build artifacts" -action{
	exec{
		msbuild ./ConsoleApplication1/ConsoleApplication1.csproj /t:clean /p:Configuration=$config
	}
}

task -name Rebuild -depends Clean,Build -description "rebuilds all artifacts from source"
task -name default -depends Build


#Invoke-psake -buildFile .\default.ps1 -properties @{"config"="unknown"}
#$psake.use_exit_on_error=$ture